<!doctype html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>list</title>
</head>
<body  >
<form action="/klass/list" method="post">
    <label>name</label>
    <input type="text" name="name">
    <label>major</label>
    <input type="text" name="major">
    <input type="submit" value="Search">
</form>

<table border="1">
    <tr>
        <td>Id</td>
        <td>Name</td>
        <td>Major</td>
        <td>Action</td>
    </tr>
    <tr th:each="klass: ${klasslist}">
        <td th:text="${klass.id}"></td>
        <td th:text="${klass.name}"></td>
        <td th:text="${klass.major}"></td>
        <td>
            <a th:href="@{/klass/delete/{id}(id=${klass.id})}">Delete</a>
            <a th:href="@{/klass/update/{id}(id=${klass.id})}">Update</a>
        </td>
    </tr>
</table>
<div>
    <a href="/klass/create">Create</a>
</div>
</body>
</html>